<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		 <meta name="viewport" content="width=device-width, initial-scale=1.0">
		<title>主页</title>
		<link rel="stylesheet" href="css/bootstrap.min14ed.css" />
		<link rel="stylesheet" href="css/font-awesome.min93e3.css" />
		<link rel="stylesheet" href="css/animate.min.css" />
		<link rel="stylesheet" href="css/style.min862f.css" />
		<script type="text/javascript" src="js/jquery.min.js" ></script>
		<script type="text/javascript" src="js/bootstrap.min.js" ></script>
		<script type="text/javascript" >
		function findWeather() {
		  var cityUrl = 'http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js';
		  $.getScript(cityUrl, function(script, textStatus, jqXHR) {
			var citytq = remote_ip_info.city ;// 获取城市
			var url = "http://php.weather.sina.com.cn/iframe/index/w_cl.php?code=js&city=" + citytq + "&day=0&dfc=3";
			$.ajax({
			  url : url,
			  dataType : "script",
			  scriptCharset : "gbk",
			  success : function(data) {
				var _w = window.SWther.w[citytq][0];
				if(_w.t1==''&&_w.t2!=''){
						 var tq = "<h2 class='font-bold'>" + _w.t2 + "℃ "+"</h2>";
						 $('#weather').html(tq);
						 
					}else{
						if(_w.t1 > _w.t2){
							var tq = "<h2 class='font-bold'>"+_w.t2 + "℃～" + _w.t1 + "℃ "+"</h2>";
							$('#weather').html(tq);
						}else{
							var tq = "<h2 class='font-bold'>"+_w.t1 + "℃～" + _w.t2 + "℃ "+"</h2>";
							$('#weather').html(tq);
						}
					}
			  }
			});
		  });
		}
		
		findWeather();
		</script>
	</head>
	<body class="gray-bg">
		<div class="wrapper wrapper-content animated fadeInRight">
			<div class="row">
				<!--温度-->
				<div class="col-sm-4">
						<div class="widget style1 navy-bg">
							<div class="row">
								<div class="col-xs-4">
									<i class="fa fa-cloud fa-5x"></i>
								</div>
						   
								<div class="col-xs-8 text-right">
									 <span> 今日温度 </span>
									 <div id="weather"></div>
								</div>
							 </div>
					  </div>
				</div>
				<!--歌曲-->
				<div class="col-sm-4">
					   <div class="widget style1 yellow-bg">
							<div class="row">
								<div class="col-xs-4">
									  <i class="fa fa-music fa-5x"></i>
								</div>
								<div class="col-xs-8 text-right">
									   <span> 歌曲 </span>
									   <h2 class="font-bold">12</h2>
								</div>
							</div>
					  </div>
				  </div>
				  <!--下载次数-->
				  <div class="col-sm-4">
					   <div class="widget style1 lazur-bg">
							<div class="row vertical-align">
								<div class="col-xs-3">
									  <i class="fa fa-user fa-5x"></i>
								</div>
								<div class="col-xs-9 text-right">
									  <span> 下载次数 </span>
									  <h2 class="font-bold">217</h2>
								</div>
							</div>
					   </div>
				</div>
			</div>
		</div>
	</body>
</html>
